Return-path: X-Andrew-Authenticated-as: 7997;andrew.cmu.edu;Ted Anderson Received: from corsica.andrew.cmu.edu via trymail for +dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl@andrew.cmu.edu (->+dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl) (->ota+space.digests) ID ; Fri, 11 Aug 89 00:24:45 -0400 (EDT) Message-ID: Reply-To: space+@Andrew.CMU.EDU From: space-request+@Andrew.CMU.EDU To: space+@Andrew.CMU.EDU Date: Fri, 11 Aug 89 00:24:30 -0400 (EDT) Subject: SPACE Digest V9 #596 SPACE Digest Volume 9 : Issue 596 Today's Topics: Geosync Satellite Finder (was Re: NASA Select Broadcasts) Re: Ground the DC-10!? Re: Request for more info on ozone depletion ---------------------------------------------------------------------- Date: 25 Jul 89 10:11:17 GMT From: mcvax!ukc!reading!cf-cm!cybaswan!iiit-sh@uunet.uu.net (Steve Hosgood) Subject: Geosync Satellite Finder (was Re: NASA Select Broadcasts) In article <4980@mtuxo.att.com> tee@mtuxo.att.com (54317-T.EBERSOLE) writes: >I told a friend of mine about the NASA Select broadcasts of Neptune >images on Tuesdays at noon. He has looked for them a couple of times >and had another friend look a couple of times, with no luck picking >up a signal. He has looked at other times to see if he can get anything, >also with no luck. Has anyone been able to find NASA Select's broadcasts? > >Thanks for any information. > Please - before you flame me for this: I *know* sci.space isn't the place for sources, but I couldn't think of a better place for this one, and it's not too long anyway. Just copy the rest of this posting into a file, make it executable and run it as a shell-script. That gives you the file 'geosync.c' which you compile and run. Enjoy! CUT HERE --- CUT HERE if test -f geosync.c; then echo "File geosync.c exists"; else echo "x - extracting geosync.c (Text)" sed 's/^X//' << 'SHAR_EOF' > geosync.c && X/* X * GEOSYNC.C - Calculate position of a geostationary satellite. X * Version 1.2: S.Hosgood, May 10th 1989 X * X * This program is in the Public Domain. X * It may be freely copied and distributed as long as no charge is made. X * X * No responsibility can be accepted for the accuracy of the results. X * The program is for amusement only. X * X * Written for the IBM PC, using Microsoft C 4.0. X * Use is made of the IBM's 'degrees' symbol. It should be no problem to X * make it work on other systems though X * X * To run: just type 'geosync' and answer the questions. X * X * Please forward bug reports to: X * Steve Hosgood (iiit-sh@pyr.swan.ac.uk). X * X */ X X# include X# include X# include X X# ifndef PI X# define PI 3.141592653589793 X# endif X X# define degtorad(x) ((x)*PI/180.0) X# define radtodeg(x) ((x)*180.0/PI) X X/* Radius of Earth, and Radius of Geosync Orbit */ X/* These constants are off the top of my head, may be a bit wrong */ X# define E_RAD 6378.388 /* Km (equator) */ X# define O_RAD 42240.31 /* Km (from centre of earth) */ X X/* flattening factor for geoid */ X# define FLAT (1.0 / 298.26) X Xdouble readval( char * ); X Xmain() X{ X double a, b, c, d, n, w; X double vert, tmp, e_rad; X double satwest, obswest, obsnorth; X X satwest = readval("Enter satellite's Longitude"); X obswest = readval("Enter observer's Longitude"); X obsnorth = readval("Enter observer's Latitude"); X X a = sin(w = degtorad(satwest - obswest)); X b = sin(n = degtorad(obsnorth)); X c = cos(w); X d = cos(n); X X /* Earth's radius follows a sin-squared law with latitude (appx) */ X e_rad = E_RAD*(1 - FLAT*b*b); X vert = O_RAD*c*d - e_rad; X X /* attempt to avoid DOMAIN errors from trig functions */ X if ((tmp = O_RAD*sqrt(c*c*b*b + a*a)) <= 1e-6 && tmp >= -1e-6) { X if (vert > 0.0) X printf("Vertically up\n"); X else X printf("Vertically down\n"); X } X else { X printf("Elevation = %6.2f\370\n", radtodeg(atan2(vert, tmp))); X X if ((tmp = c*b) <= 1e-6 && tmp >= -1e-6) X /* bearing directly east or west */ X tmp = a > 0.0? 90.0: -90.0; X else X tmp = radtodeg(atan2(a, tmp)); X X X printf("Bearing "); X if (tmp > 89.95 && tmp < 90.05) X printf("due West"); X else if (tmp < -89.95 && tmp > -90.05) X printf("due East"); X else { X /* nice to see bearings +/- South or +/- North */ X printf("(Clockwise from "); X X if (tmp < -90.0 || tmp > 90.0) { X tmp += 180.0; X printf("north"); X X if (tmp >= 180.0) X tmp -= 360.0; X } X else X printf("south"); X X printf(") = %6.2f\370", tmp); X } X X putchar('\n'); X } X X if ((d = e_rad/(O_RAD*cos(n))) > 1.0 || d < -1.0) { X printf("No geosync satellites visible from there\n"); X printf("Limit latitude is appx \361%6.2f\370\n", radtodeg(acos(E_RAD/O_RAD))); X } X else { X c = radtodeg(acos(d)); X X fputs("Satellites ", stdout); X prlong(c+obswest); X fputs(" thru ", stdout); X prlong(obswest-c); X fputs(" are visible\n", stdout); X } X X exit(0); X} X Xdouble Xreadval(str) Xchar *str; X{ X char buffer[30]; X register char chr, *cptr; X int err; X static longmesg = 0; X double ret, atof( char * ); X X do { X /* prompt */ X fprintf(stderr, "%s: ", str); X err = 0; X X cptr = fgets(buffer, sizeof buffer, stdin); X if (*cptr == '-') X cptr++; X X /* check that a number is present at all */ X if (!isdigit(*cptr) && *cptr != '.') X goto error; X X /* get integer degrees part anyway */ X ret = atoi(cptr); X X /* look for next non-numeric */ X for (; (chr = *cptr) && isdigit(chr); cptr++); X X if (chr == ':') { X /* get integer of minutes of arc */ X ret += atoi(++cptr) / 60.0; X X /* step past minutes of arc */ X for (; (chr = *cptr) && isdigit(chr); cptr++); X X if (chr == ':') { X /* get seconds of arc */ X ret += atof(++cptr) / 3600.0; X X /* step past seconds of arc */ X for (; (chr = *cptr) && isdigit(chr); cptr++); X if (chr == '.') X /* step past optional decimal part */ X for (cptr++; (chr = *cptr) && isdigit(chr); cptr++); X } X else if (chr == '.') { X /* get decimal part of minutes of arc */ X ret += atof(cptr) / 60.0; X X /* step past decimal part */ X for (cptr++; (chr = *cptr) && isdigit(chr); cptr++); X } X X } X else if (chr == '.') { X /* get decimal part of degrees */ X ret += atof(cptr); X X /* step past decimal part */ X for (cptr++; (chr = *cptr) && isdigit(chr); cptr++); X } X X /* check final character */ X switch (chr) { X case 'N': X case 'n': X case 'W': X case 'w': X case '\n': X /* do nothing */ X break; X X case 'E': X case 'e': X case 'S': X case 's': X ret = -ret; X break; X X default: X error: X /* print a fairly useful error message */ X fputs(buffer, stderr); X *cptr-- = '\0'; X while (cptr >= buffer) X *cptr-- = ' '; X X fprintf(stderr, "%s^-----Error in input\n\n", buffer); X err = 1; X } X X if (err & !longmesg) { X fprintf(stderr, "Format: {-}{NSEW}\n"); X fprintf(stderr, " ::= integer or real\n\n"); X fprintf(stderr, "Or.. : {-}:{NSEW}\n"); X fprintf(stderr, " ::= integer\n"); X fprintf(stderr, " ::= integer or real\n\n"); X fprintf(stderr, "Or.. : {-}::{NSEW}\n"); X fprintf(stderr, " ::= integer\n"); X fprintf(stderr, " ::= integer\n"); X fprintf(stderr, " ::= integer or real\n\n"); X fprintf(stderr, "Items in braces are optional\n\n"); X longmesg++; X } X } while (err); X X return (*buffer == '-')? -ret: ret; X} X Xprlong(val) Xdouble val; X{ X char eastwest; X X /* get into range +180 -> -180 degrees */ X while (val > 180.0) X val -= 360.0; X X while (val < -180.0) X val += 360.0; X X if (val < 0.0) { X eastwest = 'E'; X val = -val; X } X else if (val > 0.0) X eastwest = 'W'; X else X eastwest = ' '; X X printf("%5.1f\370%c", val, eastwest); X return; X} SHAR_EOF chmod 0644 geosync.c || echo "restore of geosync.c fails" fi exit 0 -----------------------------------------------+------------------------------ Steve Hosgood BSc, | Phone (+44) 792 295213 Image Processing and Systems Engineer, | Fax (+44) 792 295532 Institute for Industrial Information Techology,| Telex 48149 Innovation Centre, University of Wales, +------+ JANET: iiit-sh@uk.ac.swan.pyr Swansea SA2 8PP | UUCP: ..!ukc!cybaswan.UUCP!iiit-sh ----------------------------------------+------------------------------------- My views are not necessarily those of my employers! ------------------------------ Date: 28 Jul 89 18:29:05 GMT From: att!laidbak!jeq@ucbvax.Berkeley.EDU (Jonathan E. Quist) Subject: Re: Ground the DC-10!? In article <1746@scicom.AlphaCDC.COM> wats@scicom.AlphaCDC.COM (Bruce Watson) writes: > >Why not? There were civilians aboard. Did I miss something? ------------------------------ Date: 28 Jul 89 16:35:28 GMT From: ginosko!aplcen!haven!adm!smoke!chidsey@bbn.com (Irving Chidsey ) Subject: Re: Request for more info on ozone depletion In article <609@visdc.UUCP> jiii@visdc.UUCP (John E Van Deusen III) writes: ------------------------------ End of SPACE Digest V9 #596 *******************